package com.youme.model.param

import com.google.gson.Gson
import com.google.gson.annotations.SerializedName
import okhttp3.MediaType.Companion.toMediaType
import okhttp3.RequestBody

/**
 * Time:3/20/21 4:31 PM
 * Author:
 * Description:
 */
class ParamAddress(
    @SerializedName("id") val id: String,
    @SerializedName("receiverProvince") val receiverProvince: String,
    @SerializedName("receiverCity") val receiverCity: String,
    @SerializedName("receiverDistrict") val receiverDistrict: String,
    @SerializedName("receiverAddress") val receiverAddress: String,
    @SerializedName("receiverMobile") val receiverMobile: String,
    @SerializedName("receiverName") val receiverName: String,
    @SerializedName("isDefault") val isDefault: Int
) {
    fun toBody(): RequestBody = RequestBody.create("application/json".toMediaType(), Gson().toJson(this))
}